home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invisible Universe
/
Invisible Universe (1995)(Voyager)[Mac-PC].iso
/
mac
/
UNIVERSE
/
SHARED.DIR
/
01044_Script_1044
< prev
next >
Wrap
Text File
|
1995-11-21
|
8KB
|
346 lines
on doRectClick theList
global gDoRectClickP, gTSEnabled, gMouseDownTime
--put ">>>doRectClick"
--put ">>> delta time" && ( (the ticks) - gMouseDownTime)
if the ticks < (gMouseDownTime + 30) then exit
set gDoRectClickP = 0
set p = point(¼
the mouseH - the locH of sprite the clickOn, ¼
the mouseV - the locV of sprite the clickOn)
set res = 0
set c = count(theList)
repeat with i = 1 to c
set subList = getAt(theList, i)
set sc = count(subList)
repeat with j = 4 to sc
set r = getAt(subList, j)
if inside(p, r) then
set res = subList
exit repeat
end if
end repeat
if res <> 0 then exit repeat
end repeat
if res = 0 then
--put ">>>doRectClick, clearing hot spot"
if gTSEnabled then clearHotSpotText
exit
end if
--put ">>>doRectClick: " & res
set gDoRectClickP = 1
set theType = getAt(res, 1)
if theType = "B" then
goGo(getAt(res,2))
exit
end if
if theType = "U" then
global gGlossPalette
if voidP(gGlossPalette) then
createGlossPalette
end if
tell gGlossPalette to showTermCast(getAt(res,2))
tell gGlossPalette to lOpenGlossPalette
exit
end if
if theType = "ERROR" then
alert "Error in doRectClick..." & the movie && theList
exit
end if
end doRectClick
on setNavShadow r
puppetSprite 46,1
set the stretch of sprite 46 = 0
set the castNum of sprite 46 = 1041
set the Type of sprite 46 = 1
set the ink of sprite 46 = 0
set the forecolor of sprite 46 = 255
set the backcolor of sprite 46 = 0
set the blend of sprite 46 = 100
set the locV of sprite 46 = getAt(r,2)
set the locH of sprite 46 = getAt(r,1)
updateStage
end setNavShadow
on clearNavShadow
puppetSprite 46,0
updateStage
end clearNavShadow
on doDMDPopMenu theList, h, v, mark, curSel
--global gDMDPOP
if voidP(curSel) or mark = 0 then set curSel = 0
--set gDMDPOP = theList
set lineCount = the number of lines in theList
if the number of chars in line lineCount of theList = 0 then
set lineCount = lineCount - 1
end if
set len = 0
repeat with i = 1 to lineCount
if curSel > 0 then
if i = curSel then
put "ò " before line i of theList
else
put " " before line i of theList
end if
end if
set l = the number of chars in line i of theList
if len < l then set len = l
end repeat
--put "Length" && len
set cn = the number of cast "test pop"
set the text of cast cn = line 1 to lineCount of theList
set the textFont of cast cn = "Courier New"
set the textStyle of cast cn = "bold"
set the textSize of cast cn = 12
set the textAlign of cast cn = "left"
if the castNum of sprite 47 = 0 then
set sp = 47
else
set sp = 48
end if
puppetSprite sp,1
set the visibility of sprite sp = 0
set the castNum of sprite sp = cn
set the type of sprite sp = 7
set the ink of sprite sp = 0
updateStage
set spV = the bottom of sprite sp - the top of sprite sp
set spH = the right of sprite sp - the left of sprite sp
--
--
-- h and v are the "idea" top left, but we must be sure
-- that the full menu is on the stage
--
set h = the mouseH
set v = the mouseV - 10
set w = len * 7 + 20
if w+h > 640 then set h = 640 - w
if spV+v > 480 then set v = 480 - spV
set the locH of sprite sp = h
set the locV of sprite sp = v
set the visibility of sprite sp = 1
updateStage
set noSel = 0
set oldLine = 0
repeat while the mouseDown
set newLine = the mouseLine
if rollOver(sp) and newLine <> -1 then
if newLine = oldLine then next repeat
set noSel = 0
hilite line newLine of cast cn
set oldLine = newLine
updateStage
else
if not noSel then
set oldLine = 0
set noSel = 1
set the text of cast cn = line 1 to lineCount of theList
-- hilite char 9999 to 9999 of field cn
end if
end if
end repeat
if oldLine = -1 then set oldLine = 0
if not rollOver(sp) then set oldLine = 0
set the castNum of sprite sp = 0
set the visibility of sprite sp = 0
puppetSprite sp, 0
updateStage
set the visibility of sprite sp = 1
return oldLine
end doDMDPopMenu
on doDMDPopMenu2 cn, h, hLimit, mark, curSel
--global gDMDPOP
set setVis = 0
if the movie = "TOUR.DIR" or the movie = "MOVIES.DIR" then
if the type of sprite 12 = 16 then
set setVis = 1
set the visible of sprite 12 = 0
end if
end if
if voidP(curSel) or mark = 0 then set curSel = 0
set theList = the text of field cn
--set gDMDPOP = theList
set lineCount = the number of lines in theList
if the number of chars in line lineCount of theList = 0 then
set lineCount = lineCount - 1
end if
set len = 0
repeat with i = 1 to lineCount
if curSel > 0 then
if i = curSel then
put "ò " before line i of theList
else
put " " before line i of theList
end if
end if
set l = the number of chars in line i of theList
if len < l then set len = l
end repeat
set the text of cast cn = line 1 to lineCount of theList
set the textFont of cast cn = "Arial"
set the textStyle of cast cn = "bold"
set the textSize of cast cn = 14
set the textAlign of cast cn = "left"
if the castNum of sprite 47 = 0 then
set sp = 47
else
set sp = 48
end if
puppetSprite sp,1
set the visibility of sprite sp = 0
set the castNum of sprite sp = cn
set the type of sprite sp = 7
set the ink of sprite sp = 0
updateStage
set the locH of sprite sp = h
set the locV of sprite sp = -1
set the visibility of sprite sp = 1
updateStage
set noSel = 0
set oldLine = 0
repeat while not the mouseDown and rollOver(sp)
set newLine = the mouseLine
if rollOver(sp) and newLine <> -1 then
if oldLine = 1 and the mouseH > hLimit then
set oldLine = -1
exit repeat
end if
if newLine = oldLine then next repeat
set noSel = 0
hilite line newLine of cast cn
set oldLine = newLine
updateStage
else
if not noSel then
set oldLine = 0
set noSel = 1
set the text of cast cn = line 1 to lineCount of theList
-- hilite char 9999 to 9999 of field cn
end if
end if
end repeat
if oldLine <> -1 and rollOver(sp) then
-- set noSel = 0
-- set oldLine = 0
repeat while the mouseDown
set newLine = the mouseLine
if rollOver(sp) and newLine <> -1 then
if newLine = oldLine then next repeat
set noSel = 0
hilite line newLine of cast cn
set oldLine = newLine
updateStage
else
if not noSel then
set oldLine = 0
set noSel = 1
set the text of cast cn = line 1 to lineCount of theList
-- hilite char 9999 to 9999 of field cn
end if
end if
end repeat
end if
if oldLine = -1 then set oldLine = 0
if not rollOver(sp) then set oldLine = 0
set the castNum of sprite sp = 0
set the visibility of sprite sp = 0
puppetSprite sp, 0
if setVis then
set the visible of sprite 12 =1
end if
updateStage
set the visibility of sprite sp = 1
return oldLine
end doDMDPopMenu2